#ifndef _COMBAT_HANDLER
#define _COMBAT_HANDLER

class DLL_EXPORT CombatHandler
{
	friend class Player;
	Unit* m_pbelonging;
	Unit* m_target;
	set<Unit*> m_attackingtargets;
	bool m_combat;
	CombatHandler(Unit*);
	void Update();
	ui32 m_lastupdate;
	ui32 m_attackrate;
	void UpdateAttackState();
public:
	bool IsInCombat() { return m_combat; }
	// This will force client and server starting the combat with the provided unit!
	void EventCombatStart(Unit* pVictim);
	// This will force client and server stopping the combat with the provided unit!
	void EventCombatEnd();
};

#endif